package modelo;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;

import javax.swing.table.AbstractTableModel;

import datos.CentroBD;

public class ModeloTabla extends AbstractTableModel{
	
	private ResultSet rs;
	private ResultSetMetaData rsmt;
	private CentroBD bd;

	public ModeloTabla(CentroBD bd){
		this.bd = bd;
	}

	@Override
	public int getColumnCount() {
		try {
			return rsmt.getColumnCount();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return 0;
	}

	@Override
	public int getRowCount() {
		try {
			rs.getRow();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return 0;
	}

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public Class getColumnClass(int columna){
		try {
			String nombreClase = rsmt.getColumnClassName(columna + 1);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return Object.class;
	}
	
	
}
